home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libgtop.idb / usr / freeware / include / glibtop / sem_limits.h.z / sem_limits.h
Encoding:
C/C++ Source or Header  |  1999-07-16  |  2.7 KB  |  94 lines

  1. /* $Id: sem_limits.h,v 1.13 1999/02/23 11:43:16 martin Exp $ */
  2.  
  3. /* Copyright (C) 1998-99 Martin Baulig
  4.    This file is part of LibGTop 1.0.
  5.  
  6.    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
  7.  
  8.    LibGTop is free software; you can redistribute it and/or modify it
  9.    under the terms of the GNU General Public License as published by
  10.    the Free Software Foundation; either version 2 of the License,
  11.    or (at your option) any later version.
  12.  
  13.    LibGTop is distributed in the hope that it will be useful, but WITHOUT
  14.    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  15.    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  16.    for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with LibGTop; see the file COPYING. If not, write to the
  20.    Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  21.    Boston, MA 02111-1307, USA.
  22. */
  23.  
  24. #ifndef __GLIBTOP_SEM_LIMITS_H__
  25. #define __GLIBTOP_SEM_LIMITS_H__
  26.  
  27. #include <glibtop.h>
  28. #include <glibtop/global.h>
  29.  
  30. BEGIN_LIBGTOP_DECLS
  31.  
  32. #define GLIBTOP_IPC_SEMMAP    0
  33. #define GLIBTOP_IPC_SEMMNI    1
  34. #define GLIBTOP_IPC_SEMMNS    2
  35. #define GLIBTOP_IPC_SEMMNU    3
  36. #define GLIBTOP_IPC_SEMMSL    4
  37. #define GLIBTOP_IPC_SEMOPM    5
  38. #define GLIBTOP_IPC_SEMUME    6
  39. #define GLIBTOP_IPC_SEMUSZ    7
  40. #define GLIBTOP_IPC_SEMVMX    8
  41. #define GLIBTOP_IPC_SEMAEM    9
  42.  
  43. #define GLIBTOP_MAX_SEM_LIMITS    10
  44.  
  45. typedef struct _glibtop_sem_limits    glibtop_sem_limits;
  46.  
  47. struct _glibtop_sem_limits
  48. {
  49.     u_int64_t    flags,
  50.         semmap,        /* GLIBTOP_IPC_SEMMAP    */
  51.         semmni,        /* GLIBTOP_IPC_SEMMNI    */
  52.         semmns,        /* GLIBTOP_IPC_SEMMNS    */
  53.         semmnu,        /* GLIBTOP_IPC_SEMMNU    */
  54.         semmsl,        /* GLIBTOP_IPC_SEMMSL    */
  55.         semopm,        /* GLIBTOP_IPC_SEMOPM    */
  56.         semume,        /* GLIBTOP_IPC_SEMUME    */
  57.         semusz,        /* GLIBTOP_IPC_SEMUSZ    */
  58.         semvmx,        /* GLIBTOP_IPC_SEMVMX    */
  59.         semaem;        /* GLIBTOP_IPC_SEMAEM    */
  60. };
  61.  
  62. #define glibtop_get_sem_limits(sem)    glibtop_get_sem_limits_l(glibtop_global_server, sem)
  63.  
  64. #if GLIBTOP_SUID_SEM_LIMITS
  65. #define glibtop_get_sem_limits_r    glibtop_get_sem_limits_p
  66. #else
  67. #define glibtop_get_sem_limits_r    glibtop_get_sem_limits_s
  68. #endif
  69.  
  70. void glibtop_get_sem_limits_l (glibtop *server, glibtop_sem_limits *buf);
  71.  
  72. #if GLIBTOP_SUID_SEM_LIMITS
  73. void glibtop_init_sem_limits_p (glibtop *server);
  74. void glibtop_get_sem_limits_p (glibtop *server, glibtop_sem_limits *buf);
  75. #else
  76. void glibtop_init_sem_limits_s (glibtop *server);
  77. void glibtop_get_sem_limits_s (glibtop *server, glibtop_sem_limits *buf);
  78. #endif
  79.  
  80. #ifdef GLIBTOP_NAMES
  81.  
  82. /* You need to link with -lgtop_names to get this stuff here. */
  83.  
  84. extern const char *glibtop_names_sem_limits [];
  85. extern const unsigned glibtop_types_sem_limits [];
  86. extern const char *glibtop_labels_sem_limits [];
  87. extern const char *glibtop_descriptions_sem_limits [];
  88.  
  89. #endif
  90.  
  91. END_LIBGTOP_DECLS
  92.  
  93. #endif
  94.